<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of get_object</title>
  <meta name="keywords" content="get_object">
  <meta name="description" content="Return the entire object.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html . -->
<h1>get_object
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Return the entire object.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [obj] = get_object(subj,objtype,objname) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Return the entire object.

 [OBJ] = GET_OBJECT(SUBJ,OBJTYPE,OBJNAME)

 Can often be useful for peering inside a particular object. For
 instance, to view its innards of a pattern called 'epi_z', just
 type:

   get_object(subj,'pattern','epi_z')

 Technical note: You can also set OBJTYPE to 'subj', and return the
 subj structure itself back. This is useful for scripts that access
 the header</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="get_number.html" class="code" title="function [objno] = get_number(subj,objtype,objname,varargin)">get_number</a>	Internal function - find the cell index of an object</li><li><a href="get_type.html" class="code" title="function [objcell] = get_type(subj,objtype)">get_type</a>	For internal use. Returns the entire cell array of a given type</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="add_history.html" class="code" title="function [subj] = add_history(subj,objtype,objname,hist_str,displayme)">add_history</a>	Adds HIST_STR to OBJNAME's history field.</li><li><a href="display_history.html" class="code" title="function [] = display_history(subj,objtype,objname)">display_history</a>	Display the object's history field in a friendly way</li><li><a href="duplicate_object.html" class="code" title="function [subj mat] = duplicate_object(subj,objtype,old_objname,new_objname,group_name)">duplicate_object</a>	Duplicate an object</li><li><a href="exist_objfield.html" class="code" title="function [isthere] = exist_objfield(subj,objtype,objname,fieldname)">exist_objfield</a>	Checks whether the field exists</li><li><a href="exist_objsubfield.html" class="code" title="function [isthere] = exist_objsubfield(subj,objtype,objname,fieldname,subfieldname)">exist_objsubfield</a>	Checks whether the subfield exists</li><li><a href="get_objfield.html" class="code" title="function [val] = get_objfield(subj,objtype,objname,fieldname)">get_objfield</a>	Retrieves a field from an object</li><li><a href="remove_objfield.html" class="code" title="function [subj] = remove_objfield(subj,objtype,objname,fieldname)">remove_objfield</a>	Removes a field from the object</li><li><a href="set_objfield.html" class="code" title="function [subj] = set_objfield(subj,objtype,objname,fieldname,newval,varargin)">set_objfield</a>	Replace or add a field to an object</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [obj] = get_object(subj,objtype,objname)</a>
0002 
0003 <span class="comment">% Return the entire object.</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% [OBJ] = GET_OBJECT(SUBJ,OBJTYPE,OBJNAME)</span>
0006 <span class="comment">%</span>
0007 <span class="comment">% Can often be useful for peering inside a particular object. For</span>
0008 <span class="comment">% instance, to view its innards of a pattern called 'epi_z', just</span>
0009 <span class="comment">% type:</span>
0010 <span class="comment">%</span>
0011 <span class="comment">%   get_object(subj,'pattern','epi_z')</span>
0012 <span class="comment">%</span>
0013 <span class="comment">% Technical note: You can also set OBJTYPE to 'subj', and return the</span>
0014 <span class="comment">% subj structure itself back. This is useful for scripts that access</span>
0015 <span class="comment">% the header</span>
0016 
0017 <span class="comment">% This is part of the Princeton MVPA toolbox, released under the</span>
0018 <span class="comment">% GPL. See http://www.csbmb.princeton.edu/mvpa for more</span>
0019 <span class="comment">% information.</span>
0020 
0021 
0022 <span class="keyword">if</span> nargin~=3
0023   error(<span class="string">'I think you''ve forgotten to feed in all your arguments'</span>);
0024 <span class="keyword">end</span>
0025 
0026 <span class="keyword">if</span> strcmp(objtype,<span class="string">'subj'</span>)
0027   obj = subj;
0028   <span class="keyword">return</span>
0029 <span class="keyword">end</span>
0030 
0031 objcell = <a href="get_type.html" class="code" title="function [objcell] = get_type(subj,objtype)">get_type</a>(subj,objtype);
0032 objno = <a href="get_number.html" class="code" title="function [objno] = get_number(subj,objtype,objname,varargin)">get_number</a>(subj,objtype,objname);
0033 obj = objcell{objno};</pre></div>
<hr><address>Generated on Tue 06-Sep-2005 22:11:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>